﻿/*
 * 体温表的业务逻辑
 * */
using System;
using System.Collections.Generic;
using System.Text;
using WH.NurseSys.Model;
using WH.NurseSys.DAL;

namespace WH.NurseSys.BLL
{
    public class TemperatureBLL
    {
        //插入一条体温数据
        public bool Insert(Temperature temperature)
        {
            return new TemperatureDAL().Insert(temperature);
        }

        //更新一条体温数据
        public bool Update(Temperature temperature)
        {
            return new TemperatureDAL().Update(temperature);
        }

        //删除一条体温数据
        public bool Delete(Guid id)
        {
            return new TemperatureDAL().Delete(id);
        }

        //获取一条体温数据
        public Temperature GetById(Guid id)
        {
            return new TemperatureDAL().GetById(id);
        }

        //获取一个人的温度数据列表
        public List<Temperature> GetListByPatient(Guid patientId)
        {
            return new TemperatureDAL().GetListByPatient(patientId);
        }

        //判断一条记录是否已存在
        public bool Exist(Guid id)
        {
            if (new TemperatureDAL().GetById(id) == null)
                return false;
            else
                return true;
        }
    }
}
